<?php
/**
 * The template used to display Author Archive pages
 *
 * @package WordPress
 * @subpackage Twenty Ten
 * @since 3.0.0
 */
?>
<?php get_header(); ?>
<?php
global $current_user;
if(isset($_GET['author_name'])) :
	$curauth = get_userdatabylogin($author_name);
else :
	$curauth = get_userdata(intval($author));
endif;
?>

	

               <div class="content left">
                      
                       <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Page Content Above')){?>
                        
                    <?php } else {?>  <?php }?>
                    
                    
                    <?php templ_set_breadcrumbs_navigation();?>
            
            <div class="content-title">
            
               <?php echo $current_user->display_name; ?> 
                    
                    
                   
					<?php
					global $wp_query, $post;
                    $current_term = $wp_query->get_queried_object();
					$sub_catlist_list = wp_list_categories('title_li=&child_of=' . $current_term->term_id .'&show_count=1&echo=0');
					?>
              
                  
                    <?php templ_listing_pagination_form();?>
                    
            
              <a href="javascript: void(0);" id="mode"<?php if ($_COOKIE['mode'] == 'grid') echo ' class="flip"'; ?>></a>
            </div>
            
            		
            	 <!-- start-->
                 <?php if ( have_posts() ) : ?>

    <div id="loop" class="<?php if ($_COOKIE['mode'] == 'grid') echo 'grid'; else echo 'list'; ?> clear">

    <?php while ( have_posts() ) : the_post(); ?>

        <div  id="post_<?php the_ID(); ?>">
            
       
      		<?php if(get_post_meta($post->ID,'is_featured',true)){?><span class="featurd"></span><?php }?>
            
            
            <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>

            <div class="post-meta"> 
            
            <?php if(get_option('ptthemes_listing_author')=='yes' || get_option('ptthemes_listing_author')==''){?><?php _e(' by','templatic');?> <span class="post-author">
            <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>" title="Posts by <?php the_author(); ?>"><?php the_author(); ?></a>
            </span>
            <?php } ?>
                                   
             <?php if(get_option('ptthemes_listing_date')=='yes' || get_option('ptthemes_listing_date')==''){?>                  
             <?php _e(' on','templatic');?> <span class="post-date"><?php the_time(templ_get_date_format()) ?></span> 
             <?php } ?>
             
              <?php if(get_option('ptthemes_details_category')=='Yes' || get_option('ptthemes_details_category')==''){?> <span class="single_cate"><?php the_category(', '); ?></span>
             <?php } ?>
             
             <?php if(get_option('ptthemes_listing_comment')=='yes' || get_option('ptthemes_listing_comment')==''){?>  
             <em>&bull; </em>
			 <?php comments_popup_link(__('No Comments','templatic'), __('1 Comment','templatic'), __('% Comments','templatic'), '', __('Comments Closed','templatic')); ?>
             <?php } ?>
              
              
              <?php if(get_option('ptthemes_listing_tags')=='yes' || get_option('ptthemes_listing_tags')==''){?>
              <em>&bull; </em>
              <?php the_tags('<span class="post-tags">', ', ', '</span>'); ?>
            <?php } ?>
             
			 
			 <?php edit_post_link( __( 'Edit entry','templatic'), ''); ?>
            </div>
            <div class="post-content">
					
              <?php if ( has_post_thumbnail() ) :?>
            <a href="<?php the_permalink() ?>"  > 
			<?php 
				  	if(get_the_post_thumbnail( $post->ID, array(50,50))){
						$position='left';
						echo get_the_post_thumbnail( $post->ID, array(50,50),array('class'=> "alignleft",));
					}
				 ?></a>
            <?php endif; ?>
					
					<?php templ_get_listing_content()?>
                    
                    
                    
                    <p>  <a href="<?php echo get_option('siteurl');?>/?ptype=submition&pid=<?php echo $post->ID;?>"><?php _e(EDIT_TEXT);?></a> | 
                    <a href="<?php echo get_option('siteurl');?>/?ptype=submition&renew=1&pid=<?php echo $post->ID;?>"><?php _e(RENEW_TEXT);?></a> |
                     <a href="<?php echo get_option('siteurl');?>/?ptype=preview&pid=<?php echo $post->ID;?>"><?php  _e(DELETE_TEXT);?></a> |
                    <?php $exp_days = get_time_difference( $post->post_date, $post->ID);?>
                    (<?php _e(ARTICLE_EXPERIANCE_TEXT);?> <?php echo $exp_days;?>  <?php _e(ARTICLE_DAYS_TEXT);?>)
       <?php /*?><?php $exp_days = get_time_difference( $post->post_date, $post->ID); if($exp_days && $exp_days>0 && get_post_status($post->ID)=='publish'){?>(<?php _e(ARTICLE_EXPERIANCE_TEXT);?> <?php echo $exp_days;?>  <?php _e(ARTICLE_DAYS_TEXT);?>)<?php }else{?><a href="<?php echo get_option('siteurl');?>/?ptype=submition&renew=1&pid=<?php echo $post->ID;?>"><?php _e(RENEW_TEXT);?></a><?php }?><?php */?> 
       <?php /*?> <a href="<?php echo get_option('siteurl');?>/?ptype=submition&renew=1&pid=<?php echo $post->ID;?>"><?php echo RENEW_TEXT;?></a> |<?php */?>
		  </p>
            
			</div>
           
            <div class="post_bottom"><span class="i_fav"><?php echo templ_get_post_like_count($post->ID);?></span>  <span class="views"><?php _e( 'Views  : ','templatic');?><?php echo user_post_visit_count($post->ID);?></span> </div>
        </div>

    <?php endwhile; ?>

    </div>
      <?php else : ?>
     		<div  class="post-content"><h2><?php  _e('No Article Found');?> </h2> </div>
<?php endif; ?>

                 <!--#end -->
                    

            
            <?php // get_template_part('loop'); ?>
            
            <?php get_template_part('pagination'); ?>
            
            
            <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Page Content Below')){?>
                       
                    <?php } else {?>  <?php }?>
                    
                 </div> <!-- /Content -->
                            
       			<div class="sidebar right" >
                    <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Article Listing Sidebar Right')){?> <?php } else {?>  <?php }?>
                </div>  <!-- sidebar #end -->
		 <!--Page 2 column - Right Sidebar #end  -->
 
<?php get_footer(); ?>